<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('添加志愿者信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-volunteer-edit">
        <input name="activityId" th:value="${activityId}" type="hidden">
        <input name="enrollState" value="6" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">志愿者：</label>
            <div class="col-sm-8">
                <select name="volunteerId" class="form-control m-b">
                    <option th:each="volunteer : ${volunteers}" th:text="${volunteer.volunteerName}" th:value="${volunteer.volunteerId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">岗位：</label>
            <div class="col-sm-8">
                <select name="postId" class="form-control m-b">
                    <option th:each="post : ${postList}" th:text="${post.postName}"
                            th:value="${post.postId}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
  var prefix = ctx + "vtsp/enroll";
  $("#form-volunteer-edit").validate({
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/add", $('#form-volunteer-edit').serialize());
    }
  }

</script>
</body>
</html>
